package com.myecl.poker.rules.holdem;

import java.util.LinkedList;
import java.util.List;

import com.myecl.poker.rules.Card;
import com.myecl.poker.rules.Deck;
import com.myecl.poker.rules.enums.Rank;
import com.myecl.poker.rules.enums.Suit;


public final class HoldemDeck implements Deck {
		private final List<Card> cards = new LinkedList<Card>();
		
		public HoldemDeck() {
			for (Suit s: Suit.values()) {
				for (Rank r: Rank.values()) {
					cards.add(new Card(s, r));
				}		
			}
		}
		
		public List<Card> getCards() {
			List<Card> result = new LinkedList<Card>();
			for(Card c: cards) {
				result.add(c);
			}
			return result;
		}
		

		
		
		
		
		@Override
		public String toString() {
			String s = "";
			for(Card c: cards) {
				s = s + c.toString() + "\n";
			}
			return s;
		}	
}
